home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / amos / amosl0794.lzh / AMOSLIST / 000124_mcox_Tue Jul 26 10:32:48 1994.msg < prev    next >
Internet Message Format  |  1994-08-01  |  3KB

  1. Received: from access1.digex.net by nfs1.digex.net with SMTP id AA23319
  2.   (5.67b8/IDA-1.5 for <mcox@nfs1.digex.net>); Tue, 26 Jul 1994 10:32:44 -0400
  3. Received: by access1.digex.net id AA28311
  4.   (5.67b8/IDA-1.5 for mcox); Tue, 26 Jul 1994 10:32:41 -0400
  5. From: M D Cox <mcox>
  6. Message-Id: <199407261432.AA28311@access1.digex.net>
  7. Subject: CD32 AMOS
  8. To: mcox@access.digex.net (M D Cox)
  9. Date: Tue, 26 Jul 1994 10:32:41 -0400 (ADT)
  10. X-Mailer: ELM [version 2.4 PL23]
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=US-ASCII
  13. Content-Transfer-Encoding: 7bit
  14. Content-Length: 2791      
  15. Status: RO
  16.  
  17. >From amos-request@svcs1.digex.net Tue Jul 26 10:29:50 1994
  18. Received: from hela.INS.CWRU.Edu by nfs1.digex.net with SMTP id AA23033
  19.   (5.67b8/IDA-1.5 for <mcox@access.digex.net>); Tue, 26 Jul 1994 10:29:44 -0400
  20. Received: from svcs1.digex.net (svcs1.digex.net [164.109.10.23]) by hela.INS.CWRU.Edu with SMTP (8.6.8.1+cwru/CWRU-2.1-freenet-gw)
  21.     id KAA06155; Tue, 26 Jul 1994 10:29:25 -0400 (from amos-request@svcs1.digex.net)
  22. Received: by svcs1.digex.net id AA08682
  23.   (5.67b8/IDA-1.5 for amos-out); Tue, 26 Jul 1994 07:39:12 -0400
  24. Received: from nfs1.digex.net by svcs1.digex.net with SMTP id AA08678
  25.   (5.67b8/IDA-1.5 for <amos@svcs1.digex.net>); Tue, 26 Jul 1994 07:39:10 -0400
  26. Received: from post.demon.co.uk by nfs1.digex.net with SMTP id AA13157
  27.   (5.67b8/IDA-1.5 for <amos-list@access.digex.net>); Tue, 26 Jul 1994 07:39:05 -0400
  28. Received: from dynamo.demon.co.uk by post.demon.co.uk id ab21049;
  29.           26 Jul 94 11:57 GMT-60:00
  30. Received: by dynamo.demon.co.uk (V1.16/Amiga)
  31.     id AA0005c; Tue, 26 Jul 94 11:23:38 GMT
  32. Date: Tue, 26 Jul 94 11:23:38 GMT
  33. Message-Id: <9407261123.AA0005b@dynamo.demon.co.uk>
  34. Organization: Fortune Software
  35. X-Mailviewer: Mail 1.12
  36. From: Dominic Ramsey <dom@dynamo.demon.co.uk>
  37. To: amos-list@access.digex.net
  38. Subject: Re: CD32 Contrroller
  39. Status: RO
  40.  
  41. Below is the Blitz listing for the CD2 controller. Does anyone fancy
  42. trying to convert it to AMOS. It seems not all Amigas are capable
  43. of reading the controller, which might give you some probs :)
  44.  
  45. I am particularly interested in the Play/Pause button. Blue and Red
  46. are easy.
  47.  
  48. ;
  49. ; CD32 joypad reader
  50. ;
  51. ; stick controller in joystick port
  52. ; call only once per vertical blank
  53. ;
  54. ; 80% of AGA amiga's do not support the controller!!!
  55. ; so why does C= keep saying they R going to make the A1200
  56. ; CD32 compatible???? Ha ha ha
  57.  
  58. Function.l ReadJoy{b.w}              ;get joystick reading into d0
  59.   LEA $bfe001,a0:LEA $dff016,a1
  60.   MOVEQ #0,d0:MOVEQ #7,d3:MOVE  #$4000,d4
  61.   BSET  d3,$200(a0):BCLR  d3,(a0):MOVE #$2000,$dff034:MOVEQ #6,d1
  62.   loop27
  63.     TST.b (a0):TST.b (a0):TST.b (a0):TST.b (a0)
  64.     TST.b (a0):TST.b (a0):TST.b (a0):TST.b (a0)
  65.     MOVE  (a1),d2:BSET d3,(a0):BCLR d3,(a0):AND d4,d2
  66.     BNE skip:BSET  d1,d0:skip
  67.   DBF d1,loop27
  68.   MOVE  #$3000,$dff034:BCLR d3,$200(a0):ADD d0,d0:SWAP d0
  69.   MOVE  $dff00c,d1:MOVE d1,d0:LSR #1,d0:EOR d0,d1:AND #$101,d1
  70.   AND #$101,d0:ROR.b #1,d0:ROR.b #1,d1:LSR #7,d0:LSR #5,d1:OR d1,d0
  71.   UNLK a4:RTS
  72. End Function
  73.  
  74. ;bit 00 : right
  75. ;    01 : left
  76. ;    02 : down
  77. ;    03 : up
  78. ;    17 : play/pause
  79. ;    18 : reverse
  80. ;    19 : forward
  81. ;    20 : green
  82. ;    21 : yellow
  83. ;    22 : red
  84. ;    23 : blue
  85. ;
  86.  
  87. BLITZ:BitMap 0,320,256,4:Slice 0,44,4:Show 0:BitMapOutput 0
  88.  
  89. While Joyb(0)=0
  90.   VWait
  91.   Locate 3,3
  92.   NPrint Hex$(ReadJoy{3})
  93. Wend
  94.  
  95.  
  96.  
  97. ---
  98. Dominic Ramsey
  99. dom@dynamo.demon.co.uk
  100.  
  101.